import {
	request
} from "@/utils/request";
/**
 * 合同列表
 */
export const getContractList = (data) => {
	return request({
		url: `web/applet/quote/${data.customerId}/${data.tenantId}/signing-executing-list`,
		method: 'get',
	});
}

/**
 * 清单预算报价模板列表
 */
export const getBudgetQuotation = (data) => {
	return request({
		url: `web/applet/quote/${data.customerId}/${data.tenantId}/templateId`,
		method: 'get'
	});
}

/**
 * 获取报价单详情
 */
export const getBudgetdetail = (budgetId) => {
	return request({
		url: `web/applet/quote/detail/${budgetId}`,
		method: 'get'
	});
}

/**
 * 获取报价单预算汇总
 */
export const getSummary = (budgetId) => {
	return request({
		url: `web/applet/quote/getSummary/${budgetId}`,
		method: 'get'
	});
}

/**
 * 查询人工明细
 */
export const getWorkerList = (contentId) => {
	return request({
		url: `web/applet/quote/getWorkerListByContentId/${contentId}`,
		method: 'get'
	});
}

/**
 * 21.主材/辅材明细 我的项目报价条件时调用
 */
export const getMainMaterial = (data) => {
	return request({
		url: `web/applet/quote/packageMainMaterial`,
		method: 'post',
		data
	});
}
/**
 * 查询定额主材辅材明细---组合条件
 */
export const quotaProductConditionList = (quotaId, data) => {
	return request({
		url: `web/applet/quote/quotaProductConditionList/${quotaId}?productType=${data}`,
		method: "get"
	});
};

/**
 * 清单预算报价模板列表
 */
export const getProductDetail = (data) => {
	return request({
		url: `web/applet/quote/getProductDetail`,
		method: 'post',
		data
	});
}

/**
 * 查询当前合同对应所有的模板信息
 */
export const getBudetTempList = (data) => {
	return request({
		url: `web/applet/quote/budget/template/getBudetTempList`,
		method: 'post',
		data
	});
}
/**
 * 预算报价模板详情（包含空间列表及综合项）
 */
export const gettemplateDetail = (templateId) => {
	return request({
		url: `web/applet/quote/budget/template/detail?templateId=${templateId}`,
		method: 'get'
	});
}
/**
 * 定额商品获取 全部单项报价 主材辅材类型为固定商品时调用
 */
export const getProductList = (quotaId, data) => {
	return request({
		url: `web/applet/quote/quotaProductList/${quotaId}?productType=${data}`,
		method: 'get'
	});
}
/**
 * 定额模板-人工成本-列表
 */
export const getQuotaWorker = (quotaId) => {
	return request({
		url: `web/applet/quote/quotaWorker/list/${quotaId}`,
		method: 'get'
	});
}

/**
 * 设计师端-报价单管理-查询主材明细
 */
export const getMainProductsByContentId = (contentId) => {
	return request({
		url: `web/applet/quote/customer/budget/getMainProductsByContentId/${contentId}`,
		method: 'get'
	});
}


/**
 * 设计师端-报价单管理-查询辅材明细
 */
export const getAuxiliaryProductsByContentId = (contentId) => {
	return request({
		url: `web/applet/quote/customer/budget/getAuxiliaryProductsByContentId/${contentId}`,
		method: 'get'
	});
}

/**
 * 商品管理-商品查询-5.获取分类列表V2
 */
export const categoryListV2 = (data) => {
	return request({
		url: `web/applet/quote/shop/query/queryStastsList/categoryListV2`,
		method: 'post',
		data
	});
}
/**
 * 商品管理-商品查询-1.获取筛选属性列表
 */
export const queryStastsList = (data) => {
	return request({
		url: `web/applet/quote/shop/query/queryStastsList`,
		method: 'post',
		data
	});
}

/**
 * 根据字典类型查询字典数据信息
 */
export const getDict = (dictType) => {
	return request({
		url: `web/applet/dbo/system/dict/data/type/${dictType}`,
		method: 'get'
	});
}